{*******************************************************************************
* The contents of this file are used with permission, subject to the Mozilla   *
* Public License Version 1.1 (the "License"); you may not use this file except *
* in compliance with the License. You may obtain a copy of the License at      *
* http://www.mozilla.org/MPL/                                                  *
*                                                                              *
* Software distributed under the License is distributed on an "AS IS" basis,   *
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for *
* the specific language governing rights and limitations under the License.    *
*                                                                              *
* The Original Code is distributed as part of the "mediate" product and is     *
* Copyright (C) @home media limited. All Rights Reserved.                      *
*                                                                              *
* Email: support@athomemedia.co.uk                                             *
* Web:   http://www.athomemedia.co.uk                                          *
*******************************************************************************}

unit TagNames;

interface

uses Classes, AHMTypes;

const
  // License tags
  TAG_LICENSE = 'License';
  TAG_LIC_VERSION = 'Version';
  TAG_LIC_OWNER = 'Owner';
  TAG_LIC_NUMBER = 'Number';
  TAG_LIC_EMAIL = 'Email';
  TAG_LIC_DATED = 'Dated';
  TAG_LIC_PRODUCT = 'Product';
  TAG_LIC_KEY = 'Key';

  // Version information descriptor
  TAG_VER_INFO = 'VersionInformation';
  TAG_VER_PROD = 'ProductName';
  TAG_VER_NUM = 'LatestVersion';
  TAG_VER_DATE = 'ReleaseDate';
  TAG_VER_INFO_URL = 'VersionInfoURL';
  TAG_VER_DOWNLOAD = 'DownloadURL';

  // Preferences tags
  TAG_PREFERENCES = 'ClientPreferences';
  TAG_THEME_NAME = 'ThemeName';
  TAG_THEMES_URL = 'ThemesURL';
  TAG_PATH_SEP = 'PathSeparator';
  TAG_LANG_NAME = 'LanguageName';
  TAG_DVD_VIDEO_CODEC = 'DVDVideoFilter';
  TAG_DVD_AUDIO_CODEC = 'DVDAudioFilter';
  TAG_AUDIO_DEVICE = 'AudioDeviceName';
  TAG_AUDIO_CAPTURE = 'AudioCaptureSource';
  TAG_DISPLAY_FREQUENCY = 'DisplayFrequency';
  TAG_DISPLAY_ADAPTER = 'DisplayAdapter';
  TAG_SCREEN_WIDTH = 'ScreenWidth';
  TAG_SCREEN_HEIGHT = 'ScreenHeight';
  TAG_SCREEN_REFRESH = 'ScreenRefreshRate';
  TAG_SCREEN_X_OFFSET = 'ScreenXOffset';
  TAG_SCREEN_Y_OFFSET = 'ScreenYOffset';
  TAG_SCREEN_X_SCALED = 'ScreenXScaled';
  TAG_SCREEN_Y_SCALED = 'ScreenYScaled';
  TAG_TEXTURE_FORMAT = 'TextureFormat';
  TAG_FONT_QUALITY = 'FontQuality';
  TAG_AUDIO_MIXING = 'AudioMixing';
  TAG_VIDEO_RENDERER = 'VideoRenderer';
  TAG_VIDEO_THROTTLE = 'VideoFrameThrottle';
  TAG_FULL_SCREEN = 'FullScreen';
  TAG_HIDE_BORDER = 'HideWindowBorder';
  TAG_MAX_WINDOW = 'MaximizeWindow';
  TAG_TIME_FORMAT = 'TimeFormat';
  TAG_DATE_FORMAT = 'DateFormat';
  TAG_LOG_LEVEL = 'LoggingLevel';
  TAG_LOG_CACHEING = 'LoggingFileCache';
  TAG_SHOW_DIAG = 'ShowDiagnostics';
  TAG_SAVE_CONSOLE_HIST = 'SaveConsoleHistory';
  TAG_SAVE_GRAPH_TO_FILE ='SaveGraphToFile';
  TAG_KEY_PROFILE_NAME = 'KeyBindingProfile';
  TAG_MOUSE_CURSOR = 'ShowMouseCursor';
  TAG_MOUSE_RIGHT = 'MouseRightButton';
  TAG_SCRN_SAVER_FILE = 'ScreenSaverFile';
  TAG_SCRN_SAVER_DELAY = 'ScreenSaverDelay';
  TAG_SLIDE_SHOW_DELAY = 'SlideshowDelay';
  TAG_SLIDE_SHOW_PANZOOM = 'SlideshowPanZoom';
  TAG_SLIDE_SHOW_FADING = 'SlideshowFading';
  TAG_SLIDE_SHOW_BORDERS = 'SlideshowBorders';
  TAG_SOUNDEFFECTS = 'SoundEffects';
  TAG_SOUND_VOLUME = 'SoundVolume';
  TAG_EXTNS_VIDEO = 'VideoExtensions';
  TAG_EXTNS_AUDIO = 'AudioExtensions';
  TAG_EXTNS_PLAYLISTS = 'PlaylistExtensions';
  TAG_PROXY_HOST = 'ProxyHost';
  TAG_PROXY_PORT = 'ProxyPort';
  TAG_PROXY_USER = 'ProxyUserName';
  TAG_PROXY_PASS = 'ProxyPassword';
  TAG_CHECK_UPDATES = 'CheckUpdates';
  TAG_GROUP_DIRS = 'GroupDirectories';
  TAG_HIDE_BALLOON_TIPS = 'HideBalloonTips';
  TAG_VIS_QUALITY = 'VisualisationQuality';
  TAG_COMPILATION_ARTISTS = 'CompilationArtists';
  TAG_THEME_SETTINGS = 'ThemeSettings';

{$IFDEF DESIGNER}
  // Designer preferences tags
  TAG_DESIGNER_PREFS = 'DesignerPreferences';
  TAG_WINDOWS_SAVER = 'WindowsScreenSaver';
  TAG_MEDIATE_SAVER = 'MediateScreenSaver';
  TAG_LG_MAIN_TB = 'LargeMainToolbar';
  TAG_LG_PREVIEW_TB = 'LargePreviewToolbar';
  TAG_SAVE_FORM_STATE = 'SaveFormState';
  TAG_MAIN_FORM_STATE = 'MainFormState';
  TAG_PREVENT_STRETCH = 'PreventPreviewStretch';
  TAG_HORIZONTAL_LAYOUT = 'HorizonalLayout';
{$ENDIF}

  // ApplicationState tags
  TAG_APP_STATE = 'ClientState';
  TAG_PRIMARY_FOLDER = 'PrimaryMediaFolder';
  TAG_PRIMARY_FILE = 'PrimaryMediaFilename';
  TAG_SECONDARY_FOLDER = 'SecondaryMediaFolder';
  TAG_SECONDARY_FILE = 'SecondaryMediaFilename';
  TAG_MEDIA_VOLUME = 'MediaVolume';
  TAG_MEDIA_MUTING = 'MediaMuting';

  // Equaliser tags
  TAG_EQU_SETTINGS = 'EqualiserSettings';
  TAG_BASS_SETTINGS = 'BassBoostSettings';
  TAG_BASS_ENABLED = 'BoostEnabled';
  TAG_BASS_BOOST = 'BoostValue';
  TAG_BASS_FREQ = 'BoostFrequency';
  TAG_TREBLE_SETTINGS = 'TrebleBoostSettings';
  TAG_TREBLE_ENABLED = 'BoostEnabled';
  TAG_TREBLE_BOOST = 'BoostValue';
  TAG_TREBLE_FREQ = 'BoostFrequency';
  TAG_SOUND3D_SETTINGS = 'Sound3DSettings';
  TAG_SOUND3D_ENABLED = 'Sound3DEnabled';
  TAG_SOUND3D_BOOST = 'Sound3DValue';
  TAG_EQU_CURRENT = 'CurrentSettings';
  TAG_EQU_PRESETS = 'EqualiserPresets';
  TAG_EQU_PRESET = 'EqualiserPreset';
  TAG_EQU_BAND = 'Band';

  // RadioStation tags
  TAG_RADIO_CONFIG = 'RadioConfiguration';
  TAG_CURRENT_STATION = 'CurrentStation';
  TAG_STATION_PRESETS = 'StationPresets';
  TAG_STATION_PRESET = 'StationPreset';

  // KeyBinding tags
  TAG_KEY_BINDINGS = 'KeyBindings';
  TAG_SUPPORTED_PROFILES = 'SupportedKeyProfiles';
  TAG_KEY_PROFILE = 'Profile';
  TAG_NATIVE_KEY_PROFILE = 'NativeKeyProfile';
  TAG_KEY_PROFILES = 'KeyProfiles';
  TAG_KEY_ACTION = 'ActionKey';

  // Media Locations tags
  TAG_MEDIA_MANAGER = 'MediaManager';
  TAG_MEDIA_LOCATIONS = 'MediaLocations';
  TAG_MEDIA_MUSIC_LOCNS = 'Music';
  TAG_MEDIA_VIDEO_LOCNS = 'Video';
  TAG_MEDIA_PICTURE_LOCNS = 'Pictures';
  TAG_MEDIA_DIRECTORY = 'Directory';

  // Function Description tags
  TAG_FUNCTION_DESCRIPTIONS = 'FunctionDescriptions';
  TAG_FUNCTIONS = 'Functions';
  TAG_FUNCTION = 'Function';

  // Meta Description tags
  TAG_META_DESCRIPTIONS = 'MetaDataDescriptions';

  // Plugin Descriptor tags
  TAG_PLUGIN_DESCRIPTOR = 'PluginDescriptor';
  TAG_PLUGIN = 'Plugin';
  TAG_PATH = 'Path';
  TAG_PARAMS = 'Parameters';
  TAG_WIN_CLASS = 'WindowClass';
  TAG_WIN_NAME = 'WindowName';
  TAG_WIN_LOCK = 'WindowLock';
  TAG_VERSION = 'Version';
  TAG_DOCS = 'Documentation';

  // Theme Descriptor tags
  TAG_THEME_DESCRIPTOR = 'Theme';
  TAG_AUTHOR = 'Author';
  TAG_HOMEPAGE = 'HomepageUrl';
  TAG_DATE_CREATED = 'DateCreated';
  TAG_DATE_UPDATED = 'DateUpdated';
  TAG_DES_WIDTH = 'DesignedWidth';
  TAG_DES_HEIGHT = 'DesignedHeight';
  TAG_DESCRIPTION = 'Description';
  TAG_DETAILS = 'Details';
  TAG_MIN_VERSION = 'MinVersion';
  TAG_PREVIEW_LIST = 'PreviewList';
  TAG_PREVIEW = 'Preview';

  // Visual Descriptor tags
  TAG_VISUAL_DESCRIPTOR = 'VisualDescriptor';
  TAG_COLOURS = 'Colours';
  TAG_COLOUR = 'Colour';
  TAG_FILLS = 'Fills';
  TAG_FILL = 'Fill';
  TAG_GRADEDFILL = 'GradedFill';
  TAG_LINEARFILL = 'LinearFill';
  TAG_PLASMA = 'PlasmaCloud';
  TAG_PLASMAS = 'PlasmaClouds';
  TAG_BACKCOLOUR = 'BackColour';
  TAG_FRONTCOLOUR = 'FrontColour';
  TAG_LAYERS = 'Layers';
  TAG_SPEED = 'Speed';
  TAG_DIRECTION = 'Direction';
  TAG_DENSITY = 'Density';
  TAG_TOPLEFT = 'TopLeft';
  TAG_TOPRIGHT = 'TopRight';
  TAG_BOTLEFT = 'BotLeft';
  TAG_BOTRIGHT = 'BotRight';
  TAG_FONTS = 'Fonts';
  TAG_FONT = 'Font';
  TAG_SIZE = 'Size';
  TAG_TYPEFACE = 'Typeface';
  TAG_CHARACTERISTICS = 'Characteristics';
  TAG_FEATURES = 'Features';
  TAG_OUTLINE = 'Outline';
  TAG_THICKNESS = 'Thickness';
  TAG_SHADOW = 'Shadow';
  TAG_OFFSET = 'Offset';
  TAG_BITMAPS = 'Bitmaps';
  TAG_BITMAP = 'Bitmap';
  TAG_FILENAME = 'Filename';
  TAG_LOADING = 'Loading';
  TAG_BACKGROUNDS = 'Backgrounds';
  TAG_BACKGROUND = 'Background';
  TAG_FOREGROUNDS = 'Foregrounds';
  TAG_FOREGROUND = 'Foreground';
  TAG_SHAPES = 'Shapes';
  TAG_SHAPE = 'Shape';
  TAG_GEOMETRY = 'Geometry';
  TAG_PEN = 'Pen';
  TAG_WIDTH = 'Width';
  TAG_BRUSH = 'Brush';
  TAG_CAPTIONS = 'Captions';
  TAG_CAPTION = 'Caption';
  TAG_ALIGN = 'Align';
  TAG_DISPLAY = 'Display';
  TAG_MEDIAWINDOWS = 'MediaWindows';
  TAG_MEDIAWINDOW = 'MediaWindow';
  TAG_PLUGINWINDOWS = 'PluginWindows';
  TAG_PLUGINWINDOW = 'PluginWindow';
  TAG_EFFECTS = 'Effects';
  TAG_EFFECT = 'Effect';
  TAG_GAMMA = 'Gamma';
  TAG_BUTTONS = 'Buttons';
  TAG_BUTTON = 'Button';
  TAG_TEXTEDITS = 'TextEdits';
  TAG_TEXTEDIT = 'TextEdit';
  TAG_CLONE = 'Clone';
  TAG_GRIDS = 'Grids';
  TAG_GRID = 'Grid';
  TAG_GRID_ITEMS = 'GridItems';
  TAG_GRID_ITEM = 'GridItem';
  TAG_MARGINS = 'Margins';
  TAG_POSITION = 'Position';
  TAG_STATES = 'States';
  TAG_STATE = 'State';
  TAG_ICONS = 'Icons';
  TAG_ICON = 'Icon';
  TAG_MEDIAGRIDS = 'MediaGrids';
  TAG_MEDIAGRID = 'MediaGrid';
  TAG_DEFAULTIMAGES = 'DefaultImages';
  TAG_MEDIATYPE = 'MediaType';
  TAG_BARS = 'Bars';
  TAG_BAR = 'Bar';
  TAG_VERT_MARGIN = 'VerticalMargins';
  TAG_HORZ_MARGIN = 'HorizontalMargins';
  TAG_IMAGES = 'Images';
  TAG_BARTYPE = 'BarType';
  TAG_GAUGES = 'Gauges';
  TAG_GAUGE = 'Gauge';
  TAG_POINTER = 'Pointer';
  TAG_ALIGNMENT = 'Alignment';
  TAG_LENGTH = 'Length';
  TAG_CENTER = 'Center';
  TAG_ROTATE = 'Rotate';
  TAG_DIALS = 'Dials';
  TAG_DIAL = 'Dial';
  TAG_KNOB = 'Knob';

  // Interface Descriptor tags
  TAG_INTERFACE_DESCRIPTOR = 'InterfaceDescriptor';
  TAG_GLOBAL_EXPS = 'Expressions';
  TAG_EXPRESSION = 'Expression';
  TAG_GLOBAL_MACROS = 'GlobalMacros';
  TAG_MACRO = 'Macro';
  TAG_GLOBAL_ACTIONS = 'GlobalActions';
  TAG_ACTIONS = 'Actions';
  TAG_ACTION = 'Action';
  TAG_PLACES = 'Places';
  TAG_PLACE = 'Place';
  TAG_ROTATION = 'Rotation';
  TAG_FLIP = 'Flip';
  TAG_ANIMATORS = 'Animators';
  TAG_ANIMATOR = 'Animator';
  TAG_ANIMATION = 'Animation';
  TAG_PARAMETER = 'Parameter';
  TAG_LAYOUTS = 'Layouts';
  TAG_LAYOUT = 'Layout';
  TAG_CUSTOM = 'Custom';
  TAG_COLUMNS = 'Columns';
  TAG_COLUMN = 'Column';
  TAG_ROWS = 'Rows';
  TAG_ROW = 'Row';
  TAG_SCROLL = 'Scroll';
  TAG_CONTROL = 'Control';
  TAG_CONTROLS = 'Controls';
  TAG_DEPTH = 'Depth';
  TAG_PLACEMENT = 'Placement';
  TAG_FOCUSED = 'FocusedEffect';
  TAG_PRESSED = 'PressedEffect';
  TAG_CHECKED = 'CheckedEffect';
  TAG_SCALE = 'Scale';
  TAG_NAVIGATION = 'NavigateControl';
  TAG_STATUS = 'Status';
  TAG_HINT = 'Hint';
  TAG_IMAGE = 'Image';
  TAG_MEDIACONTROL = 'MediaControl';
  TAG_PLUGINCONTROL = 'PluginControl';
  TAG_COMBOBUTTON = 'ComboButton';
  TAG_RADIOBUTTON = 'RadioButton';
  TAG_CHECKBUTTON = 'CheckButton';
  TAG_GRIDCONTROL = 'GridControl';
  TAG_MEDIAGRIDCONTROL = 'MediaGridControl';
  TAG_GAUGECONTROL = 'GaugeControl';
  TAG_DIALCONTROL = 'DialControl';
  TAG_CONTAINERS = 'Containers';
  TAG_CONTAINER = 'Container';
  TAG_CONTENTS = 'Contents';
  TAG_PROPERTIES = 'Properties';
  TAG_SCREENS = 'Screens';
  TAG_SCREEN = 'Screen';
  TAG_CONTAINS = 'Contains';
  TAG_DEFAULT_CONTROL = 'DefaultControl';
  TAG_META_INFO = 'MetaInformation';
  TAG_META_ITEM = 'MetaData';
  TAG_META_VALUE = 'MetaValue';
  TAG_TIMERS = 'Timers';
  TAG_TIMER = 'Timer';
  TAG_INTERVAL = 'Interval';

  // Language Descriptor tags
  TAG_LANGUAGE_DESCRIPTOR = 'LanguageDescriptor';
  TAG_SUPPORTED_LANGUAGES = 'SupportedLanguages';
  TAG_LANGUAGES = 'Languages';
  TAG_LANGUAGE = 'Language';
  TAG_NATIVE_LANGUAGE = 'NativeLanguage';
  TAG_TEXT = 'Text';

  // Audio Descriptor tags
  TAG_AUDIO_DESCRIPTOR = 'AudioDescriptor';
  TAG_SOUNDS = 'Sounds';
  TAG_SOUND = 'Sound';

  // Attribute names
  ATTR_NAME = 'name';
  ATTR_DESC = 'description';
  ATTR_INHERIT = 'inherit';
  ATTR_VERSION = 'version';
  ATTR_DIRECTORY = 'directory';
  ATTR_BOLD = 'bold';
  ATTR_ITALIC = 'italic';
  ATTR_UNDERLINE = 'underline';
  ATTR_OUTLINE = 'outline';
  ATTR_SHADOW = 'shadow';
  ATTR_GLOW = 'glow';
  ATTR_ASPECT = 'aspect';
  ATTR_ONDEMAND = 'ondemand';
  ATTR_TYPE = 'type';
  ATTR_RADIUS = 'radius';
  ATTR_ANGLE = 'angle';
  ATTR_SWEEP = 'sweep';
  ATTR_VERT = 'vertical';
  ATTR_HORIZ = 'horizontal';
  ATTR_TEXT = 'text';
  ATTR_WORDWRAP = 'wordwrap';
  ATTR_SCROLL = 'scrolling';
  ATTR_VERTICAL = 'vertical';
  ATTR_TARGET = 'target';
  ATTR_FUNCTION = 'function';
  ATTR_PARAMETER = 'parameter';
  ATTR_FINAL = 'final';
  ATTR_STYLE = 'style';
  ATTR_UP = 'up';
  ATTR_DOWN = 'down';
  ATTR_LEFT = 'left';
  ATTR_RIGHT = 'right';
  ATTR_TOP = 'top';
  ATTR_MAXIMIZED = 'maximized';
  ATTR_HSPLIT = 'horizontalSplit';
  ATTR_VSPLIT = 'verticalSplit';
  ATTR_VISIBLE = 'visible';
  ATTR_ENABLED = 'enabled';
  ATTR_MOUSE = 'mouse';
  ATTR_ROWS = 'rows';
  ATTR_COLS = 'columns';
  ATTR_POSITION = 'position';
  ATTR_ROW = 'row';
  ATTR_COL = 'column';
  ATTR_WIDTH = 'width';
  ATTR_HEIGHT = 'height';
  ATTR_NUMBER = 'number';
  ATTR_CLIPPING = 'clipping';
  ATTR_VALUE = 'value';
  ATTR_KEYNAME = 'keyname';
  ATTR_GROUP = 'group';
  ATTR_INDEX = 'index';
  ATTR_STATE = 'state';
  ATTR_MODE = 'mode';
  ATTR_VIRTUAL = 'virtual';
  ATTR_DURATION = 'duration';
  ATTR_CONCURRENT = 'concurrent';
  ATTR_PERSISTENT = 'persistent';
  ATTR_BREAKABLE = 'breakable';
  ATTR_STREAM = 'stream';
  ATTR_REPEAT = 'repeat';
  ATTR_GENRE = 'genre';

  // Attribute values
  ATTR_VAL_SELF = 'self';
  ATTR_VAL_BACKWARDS = 'backwards';
  ATTR_VAL_FORWARDS = 'forwards';
  ATTR_VAL_RECT = 'rectangle';
  ATTR_VAL_ROUND_RECT = 'roundrect';
  ATTR_VAL_ELLIPSE = 'ellipse';
  ATTR_VAL_LINE = 'line';
  ATTR_VAL_ARC = 'arc';
  ATTR_VAL_NONE = 'none';
  ATTR_VAL_LEFT = 'left';
  ATTR_VAL_RIGHT = 'right';
  ATTR_VAL_TOP = 'top';
  ATTR_VAL_BOTTOM = 'bottom';
  ATTR_VAL_TOPLEFT = 'topleft';
  ATTR_VAL_TOPRIGHT = 'topright';
  ATTR_VAL_BOTTOMLEFT = 'bottomleft';
  ATTR_VAL_BOTTOMRIGHT = 'bottomright';
  ATTR_VAL_CENTER = 'center';
  ATTR_VAL_PARENT = 'parent';
  ATTR_VAL_SCREEN = 'screen';
  ATTR_VAL_CONTAINER = 'container';
  ATTR_VAL_DESCRIPTOR = 'descriptor';
  ATTR_VAL_TEXT = 'text';
  ATTR_VAL_DESCR = 'description';
  ATTR_VAL_DATA = 'data';
  ATTR_VAL_CONTROL = 'control';
  ATTR_VAL_SOUND = 'sound';
  ATTR_VAL_VALUE = 'value';
  ATTR_VAL_META = 'meta';
  ATTR_VAL_MACRO = 'macro';
  ATTR_VAL_PROGRESS = 'progress';
  ATTR_VAL_SCROLL = 'scroll';
  ATTR_VAL_SLIDER = 'slider';
  ATTR_VAL_PLAYLIST = 'playlist';
  ATTR_VAL_FADEIN = 'fadein';
  ATTR_VAL_FADEOUT = 'fadeout';
  ATTR_VAL_SLIDE = 'slide';
  ATTR_VAL_SIZE = 'size';
  ATTR_VAL_PAUSE = 'pause';
  ATTR_VAL_FUNCTION = 'function';
  ATTR_VAL_ROTATE = 'rotate';
  ATTR_VAL_SCALE = 'scale';
  ATTR_VAL_NATIVE = 'native';
  ATTR_VAL_EXTERNAL = 'external';
  ATTR_VAL_PLUGIN = 'plugin';
  ATTR_VAL_ACTION = 'action';
  ATTR_VAL_TIMER = 'timer';

  // Control state values
  STATE_VAL_IDLE = 'idle';
  STATE_VAL_FOCUS = 'focussed';
  STATE_VAL_PRESS = 'pressed';
  STATE_VAL_DISABLE = 'disabled';
  STATE_VAL_IDLE_CHECK = 'idle,checked';
  STATE_VAL_FOCUS_CHECK = 'focussed,checked';
  STATE_VAL_PRESS_CHECK = 'pressed,checked';
  STATE_VAL_DISABLE_CHECK = 'disabled,checked';

  // Control media types
  MEDIA_VAL_UNKNOWN = 'unknown';
  MEDIA_VAL_PLAYLIST = 'playlist';
  MEDIA_VAL_PICTURE = 'picture';
  MEDIA_VAL_AUDIO = 'audio';
  MEDIA_VAL_RADIO = 'radio';
  MEDIA_VAL_VIDEO = 'video';
  MEDIA_VAL_DVD = 'dvd';
  MEDIA_VAL_INFO = 'info';
  MEDIA_VAL_THEME = 'theme';
  MEDIA_VAL_PARENT = 'parent';
  MEDIA_VAL_FOLDER = 'folder';
  MEDIA_VAL_ALL = 'all';

  // Bar image type
  BARIMG_VAL_BGSTART = 'background.start';
  BARIMG_VAL_BGMIDDLE = 'background.middle';
  BARIMG_VAL_BGFINISH = 'background.finish';
  BARIMG_VAL_FGSTART = 'foreground.start';
  BARIMG_VAL_FGMIDDLE = 'foreground.middle';
  BARIMG_VAL_FGFINISH = 'foreground.finish';

  // Playlist types
  PLAYLIST_VAL_PRIMARY = 'primary';
  PLAYLIST_VAL_SECONDARY = 'secondary';
  PLAYLIST_VAL_SECTHENPRI = 'secondaryprimary';
  PLAYLIST_VAL_PRITHENSEC = 'primarysecondary';

  // Virtual key names
  KEY_VAL_ENTER = 'enter';
  KEY_VAL_CLEAR = 'clear';
  KEY_VAL_BACKSPACE = 'backspace';
  KEY_VAL_DELETE = 'delete';
  KEY_VAL_LEFT = 'left';
  KEY_VAL_RIGHT = 'right';
  KEY_VAL_UP = 'up';
  KEY_VAL_DOWN = 'down';
  KEY_VAL_HOME = 'home';
  KEY_VAL_END = 'end';
  KEY_VAL_PAGEUP = 'pageup';
  KEY_VAL_PAGEDN = 'pagedown';
  KEY_VAL_TAB = 'tab';
  KEY_VAL_SPACE = 'space';

  // Depth types
  DEPTH_VAL_FG = 'foreground';
  DEPTH_VAL_MG = 'midground';
  DEPTH_VAL_BG = 'background';

  // XML helper functions
  function MediaType2Str(Value: TAHMMediaType): String;
  function Str2MediaType(Value: String): TAHMMediaType;
  function StreamType2Str(Value: TAHMStreamType): String;
  function Str2StreamType(Value: String): TAHMStreamType;
  function AnimationType2Str(Value: TAHMAnimationType): String;
  function Str2AnimationType(Value: String): TAHMAnimationType;
  function Direction2Str(Value: TAHMDirection): String;
  function Str2Direction(Value: String): TAHMDirection;
  function Depth2Str(Value: TAHMDepthType): String;
  function Str2Depth(Value: String): TAHMDepthType;

implementation

uses SysUtils;

  function MediaType2Str(Value: TAHMMediaType): String;
  begin
    case Value of
      mtUnknown: Result := MEDIA_VAL_UNKNOWN;
      mtParent: Result := MEDIA_VAL_PARENT;
      mtFolder: Result := MEDIA_VAL_FOLDER;
      mtPlaylist: Result := MEDIA_VAL_PLAYLIST;
      mtTheme: Result := MEDIA_VAL_THEME;
      mtImage: Result := MEDIA_VAL_PICTURE;
      mtAudio: Result := MEDIA_VAL_AUDIO;
      mtRadio: Result := MEDIA_VAL_RADIO;
      mtVideo: Result := MEDIA_VAL_VIDEO;
      mtDVD: Result := MEDIA_VAL_DVD;
      mtInfo: Result := MEDIA_VAL_INFO;
      else Result := MEDIA_VAL_ALL;
    end;
  end;

  function Str2MediaType(Value: String): TAHMMediaType;
  begin
    if Value = MEDIA_VAL_UNKNOWN then Result := mtUnknown
    else if Value = MEDIA_VAL_PARENT then Result := mtParent
    else if Value = MEDIA_VAL_FOLDER then Result := mtFolder
    else if Value = MEDIA_VAL_PLAYLIST then Result := mtPlaylist
    else if Value = MEDIA_VAL_THEME then Result := mtTheme
    else if Value = MEDIA_VAL_PICTURE then Result := mtImage
    else if Value = MEDIA_VAL_AUDIO then Result := mtAudio
    else if Value = MEDIA_VAL_RADIO then Result := mtRadio
    else if Value = MEDIA_VAL_VIDEO then Result := mtVideo
    else if Value = MEDIA_VAL_DVD then Result := mtDVD
    else if Value = MEDIA_VAL_INFO then Result := mtInfo
    else Result := mtAll
  end;

  function StreamType2Str(Value: TAHMStreamType): String;
  begin
    case Value of
      stSecondary: Result := PLAYLIST_VAL_SECONDARY;
      stSecThenPri: Result := PLAYLIST_VAL_SECTHENPRI;
      stPriThenSec: Result := PLAYLIST_VAL_PRITHENSEC
      else Result := PLAYLIST_VAL_PRIMARY;
    end;
  end;

  function Str2StreamType(Value: String): TAHMStreamType;
  begin
    if Value = PLAYLIST_VAL_SECONDARY then Result := stSecondary
    else if Value = PLAYLIST_VAL_SECTHENPRI then Result := stSecThenPri
    else if Value = PLAYLIST_VAL_PRITHENSEC then Result := stPriThenSec
    else Result := stPrimary
  end;

  function AnimationType2Str(Value: TAHMAnimationType): String;
  begin
    case Value of
      atFadeIn:   Result := ATTR_VAL_FADEIN;
      atFadeOut:  Result := ATTR_VAL_FADEOUT;
      atSlide:    Result := ATTR_VAL_SLIDE;
      atPause:    Result := ATTR_VAL_PAUSE;
      atMacro:    Result := ATTR_VAL_MACRO;
      atFunction: Result := ATTR_VAL_FUNCTION;
      atRotate:   Result := ATTR_VAL_ROTATE;
      atScale:    Result := ATTR_VAL_SCALE;
      atSize:     Result := ATTR_VAL_SIZE
      else        Result := '';
    end;
  end;

  function Str2AnimationType(Value: String): TAHMAnimationType;
  begin
    if Value = ATTR_VAL_FADEIN then Result := atFadeIn
    else if Value = ATTR_VAL_FADEOUT then Result := atFadeOut
    else if Value = ATTR_VAL_SLIDE then Result := atSlide
    else if Value = ATTR_VAL_PAUSE then Result := atPause
    else if Value = ATTR_VAL_MACRO then Result := atMacro
    else if Value = ATTR_VAL_FUNCTION then Result := atFunction
    else if Value = ATTR_VAL_ROTATE then Result := atRotate
    else if Value = ATTR_VAL_SCALE then Result := atScale
    else if Value = ATTR_VAL_SIZE then Result := atSize
    else Result := atUnknown;
  end;

  function Direction2Str(Value: TAHMDirection): String;
  begin
    case Value of
      diUp:    Result := ATTR_UP;
      diDown:  Result := ATTR_DOWN;
      diLeft:  Result := ATTR_LEFT;
      diRight: Result := ATTR_RIGHT;
      else Result := '';
    end;
  end;

  function Str2Direction(Value: String): TAHMDirection;
  begin
    if Value = ATTR_UP then Result := diUp
    else if Value = ATTR_DOWN then Result := diDown
    else if Value = ATTR_LEFT then Result := diLeft
    else if Value = ATTR_RIGHT then Result := diRight
    else Result := diNone;
  end;

  function Depth2Str(Value: TAHMDepthType): String;
  begin
    case Value of
      dtForeground: Result := DEPTH_VAL_FG;
      dtMidGround:  Result := DEPTH_VAL_MG;
      dtBackground: Result := DEPTH_VAL_BG;
      else Result := '';
    end;
  end;

  function Str2Depth(Value: String): TAHMDepthType;
  begin
    if Value = DEPTH_VAL_FG then Result := dtForeground
    else if Value = DEPTH_VAL_BG then Result := dtBackground
    else Result := dtMidGround;
  end;

end.
